package objects;

import java.sql.Timestamp;

public class GeneralLog {
    
	private Integer id;
    private Integer type;
    private Integer student_id;
	private Integer location_id;
	private Timestamp timest;
	private Integer duration;

	public GeneralLog() {
		id = 0;
		type =0;
		student_id = 0;
		location_id = 0;
		timest = new Timestamp(0);
		duration = 0;
	}
	
    public GeneralLog( Integer newid) {
        id = newid;
        type =0;
        student_id = 0;
        location_id = 0;
        timest = new Timestamp(0);
        duration = 0;
    }


	public void setID(Integer newid) {
		id = newid;
	}

	public void setType(Integer newtype) {
		type = newtype;
	}

	public void setStudentID(Integer newstid) {
		student_id = newstid;
	}

	public void setLocationID(Integer locid) {
		location_id = locid;
	}

	public void setTimeSt(Timestamp newtmst) {
		timest.setTime(newtmst.getTime());
	}
	
	public void setDuration(Integer newduration) {
		duration = newduration;
	}

	public Integer getID() {
		return id;
	}

	public Integer getType() {
		return type;
	}	

	public Integer getStudentID() {
		return student_id;
	}

	public Integer getLocationID() {
		return location_id;
	}
	
	public Timestamp getTimeSt() {
		return timest;
	}

	public Integer getDuration() {
		return duration;
	}

    public void display() {
        System.out.println("GeneralLog ID " + id);
        System.out.println("Type: " + type);
        System.out.println("Student ID: " + student_id);
        System.out.println("Location ID: " + location_id);
        System.out.println("Timestamp: " + timest);
		System.out.println("Duration:" + duration);
    }

}
